﻿<phone:PhoneApplicationPage x:Class="BattlelogMobile.Client.View.SoldierPage"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
        xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
        xmlns:amq="clr-namespace:AmCharts.Windows.QuickCharts;assembly=AmCharts.Windows.QuickCharts.WP"
        xmlns:conv="clr-namespace:BattlelogMobile.Client.Converter"
        xmlns:sys="clr-namespace:System;assembly=mscorlib" 
        FontFamily="{StaticResource PhoneFontFamilyNormal}"
        FontSize="{StaticResource PhoneFontSizeNormal}"
        Foreground="{StaticResource PhoneForegroundBrush}"
        SupportedOrientations="Portrait"
        Orientation="Portrait"
        shell:SystemTray.IsVisible="True"
        mc:Ignorable="d"
        d:DesignWidth="480"
        d:DesignHeight="768"
        DataContext="{Binding Soldier, Source={StaticResource Locator}}">

    <phone:PhoneApplicationPage.Resources>
        <conv:DoubleStringConverter x:Key="DoubleStringConverter" />
        <conv:TimeSpanStringConverter x:Key="TimeSpanStringConverter" />
        <conv:ImageUrlConverter x:Key="ImageUrlConverter" />
        <conv:IntegerStringConverter x:Key="IntegerStringConverter" />
        <conv:DoublePercentageStringConverter x:Key="DoublePercentageStringConverter" />
        <conv:KillsAndAssistsStringConverter x:Key="KillsAndAssistsStringConverter" />
        <sys:String x:Key="ServiceStarUrl">/servicestar.png</sys:String>
    </phone:PhoneApplicationPage.Resources>

    <!--ContentPanel - place additional content here-->
    <Grid x:Name="LayoutRoot">
        <controls:Panorama Title="{Binding ApplicationName}">

            <!-- Overview / Panorama item one -->
            <controls:PanoramaItem Header="Overview">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <TextBlock Grid.Row="0" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Name" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="0" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Soldier.User.Name}" HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="1" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Rank" VerticalAlignment="Center" />
                    <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0" >
                        <Image Source="{Binding Soldier.User.Gravatar, Converter={StaticResource ImageUrlConverter}, ConverterParameter=Gravatar}" Width="64" Height="64" HorizontalAlignment="Right" VerticalAlignment="Center" />
                        <Image Source="{Binding Soldier.Rank, Converter={StaticResource ImageUrlConverter}, ConverterParameter=Rank}" Width="92" Height="92" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,-20,0" />
                    </StackPanel>
                    <!--<Image Grid.Row="1" Grid.Column="1" Source="{Binding Soldier.Rank, Converter={StaticResource ImageUrlConverter}, ConverterParameter=Rank}" Width="64" Height="64" Margin="95,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />-->
                    <!--<TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Soldier.Rank}" HorizontalAlignment="Right" VerticalAlignment="Center" />-->

                    <TextBlock Grid.Row="2" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Skill" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="2" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Soldier.Skill}" HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="3" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Time played" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="3" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Soldier.TimePlayed, Converter={StaticResource TimeSpanStringConverter}}" HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="4" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Score / min" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="4" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Soldier.ScorePerMinute}" HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="5" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="K / D ratio" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="5" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Soldier.KillDeathRatio, Converter={StaticResource DoubleStringConverter}}" HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="6" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="W / L ratio" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="6" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Soldier.WinLoseRatio, Converter={StaticResource DoubleStringConverter}}" HorizontalAlignment="Right" VerticalAlignment="Center" />
                </Grid>
            </controls:PanoramaItem>

            <!-- Score / Panorama item two -->
            <controls:PanoramaItem Header="Score">
                <StackPanel Orientation="Vertical">
                    <ListBox Width="400" Margin="0" ItemsSource="{Binding Soldier.Score.Kits}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="200" />
                                        <ColumnDefinition Width="200" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Row="0" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Path=Type}" HorizontalAlignment="Left" />
                                    <Image Grid.Row="0" Grid.Column="1" Source="{Binding Path=Type, Converter={StaticResource ImageUrlConverter}, ConverterParameter=Kit}" Width="26" Height="26" Margin="30,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
                                    <TextBlock Grid.Row="0" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Path=Score, Converter={StaticResource IntegerStringConverter}}" HorizontalAlignment="Right" Margin="0,0,0,10" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

                    <ListBox Width="400" Margin="0" ItemsSource="{Binding Soldier.Score.Others}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="200" />
                                        <ColumnDefinition Width="200" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Row="0" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Path=Type}" HorizontalAlignment="Left" />
                                    <TextBlock Grid.Row="0" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Path=Score, Converter={StaticResource IntegerStringConverter}}" HorizontalAlignment="Right" Margin="0,0,0,10"/>
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="200" />
                            <ColumnDefinition Width="230" />
                        </Grid.ColumnDefinitions>
                        <Rectangle Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Stroke="White" StrokeThickness="1" Fill="White" Width="400" Height="1" Margin="10,0,0,-10" VerticalAlignment="Top" />
                        <TextBlock Grid.Row="0" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" 
                                   Text="Total Score" 
                                   Margin="22,5,0,0" 
                                   VerticalAlignment="Center" />
                        <TextBlock Grid.Row="0" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" 
                                   Text="{Binding Soldier.Score.TotalScore, Converter={StaticResource IntegerStringConverter}, ConverterParameter=AddEquals}" 
                                   HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,20,0" />
                    </Grid>
                </StackPanel>
            </controls:PanoramaItem>

            <!-- Kit progression / Panorama item three -->
            <controls:PanoramaItem Header="Progression">
                <Grid x:Name="ProgressGrid" Grid.Row="1">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <amq:SerialChart 
                        Grid.Row="0" 
                        Grid.Column="0"
                        Grid.ColumnSpan="2"
                        ValueFormatString="0.00"
                        VerticalAlignment="Top"
                        DataSource="{Binding Soldier.KitProgressions}" 
                        CategoryValueMemberPath="Type"
                        AxisForeground="White"
                        PlotAreaBackground="Black"
                        GridStroke="DarkGray">
                        <amq:SerialChart.Graphs>
                            <amq:ColumnGraph ValueMemberPath="Progress" Title="Completion %" Brush="#8000FF00" ColumnWidthAllocation="0.7" />
                        </amq:SerialChart.Graphs>
                    </amq:SerialChart>

                    <ListBox Grid.Row="1" Grid.Column="0" Width="400" Margin="0" ItemsSource="{Binding FirstTwoKitProgressions}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="145" />
                                        <ColumnDefinition Width="75" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Row="1" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Type}" />
                                    <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
                                        <Image Source="{StaticResource ServiceStarUrl}" Width="30" Height="30" VerticalAlignment="Center" />
                                        <TextBlock Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding ServiceStars}" />
                                    </StackPanel>
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

                    <ListBox Grid.Row="1" Grid.Column="1" Width="400" Margin="0" ItemsSource="{Binding LastTwoKitProgressions}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="145" />
                                        <ColumnDefinition Width="75" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Row="1" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Type}" />
                                    <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
                                        <Image Source="{StaticResource ServiceStarUrl}" Width="30" Height="30" VerticalAlignment="Center" />
                                        <TextBlock Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding ServiceStars}" />
                                    </StackPanel>
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </controls:PanoramaItem>

            <!-- Kit usages / Panorama item four -->
            <controls:PanoramaItem Header="Kit usage">
                <Grid x:Name="KitUsageGrid">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <amq:PieChart 
                        x:Name="KitUsageChart" 
                        Grid.Row="0"
                        Grid.Column="0"
                        Grid.ColumnSpan="2"
                        DataSource="{Binding Soldier.Score.Kits}"
                        TitleMemberPath="Type" 
                        ValueMemberPath="Percentage">
                        <amq:PieChart.Brushes>
                            <SolidColorBrush Color="#26729a" />
                            <SolidColorBrush Color="#b6a761" />
                            <SolidColorBrush Color="#86ae31" />
                            <SolidColorBrush Color="#a1562e" />
                        </amq:PieChart.Brushes>
                    </amq:PieChart>

                    <ListBox Grid.Row="1" Grid.Column="0" Margin="0" ItemsSource="{Binding FirstTwoKits}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="145" />
                                        <ColumnDefinition Width="90" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Row="1" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" 
                                               Text="{Binding Type}" VerticalAlignment="Center" />
                                    <TextBlock Grid.Row="1" Grid.Column="1" FontSize="24" 
                                               Text="{Binding Percentage, Converter={StaticResource DoublePercentageStringConverter}}" 
                                               Margin="0,4,25,0" HorizontalAlignment="Right" VerticalAlignment="Center" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

                    <ListBox Grid.Row="1" Grid.Column="1" Margin="0" ItemsSource="{Binding LastTwoKits}">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="145" />
                                        <ColumnDefinition Width="90" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Row="1" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" 
                                               Text="{Binding Type}" VerticalAlignment="Center" />
                                    <TextBlock Grid.Row="1" Grid.Column="1" FontSize="24" 
                                               Text="{Binding Percentage, Converter={StaticResource DoublePercentageStringConverter}}" 
                                               Margin="0,4,25,0" HorizontalAlignment="Right" VerticalAlignment="Center" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </controls:PanoramaItem>

            <!-- Lastest awards / Panorama item five -->
            <controls:PanoramaItem Header="Latest awards">
                <ListBox Width="400" Margin="10" ItemsSource="{Binding Soldier.Awards}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="40" />
                                    <RowDefinition Height="80" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="130" />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Style="{StaticResource PhoneTextLargeStyle}" 
                                           Text="{Binding Path=Name}" />
                                <Image Grid.Row="1" Grid.Column="0" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="14,5,5,0"
                                       Source="{Binding Path=Image, Converter={StaticResource ImageUrlConverter}, ConverterParameter=Award}"
                                       Width="{Binding Path=Width}" 
                                       Height="{Binding Path=Height}" />
                                <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource PhoneTextNormalStyle}" 
                                           Text="{Binding Description}" TextWrapping="Wrap" />
                            </Grid>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PanoramaItem>

            <!-- Top weapons / Panorama item six -->
            <controls:PanoramaItem Header="Top weapons">
                <ListBox Width="400" Margin="10" ItemsSource="{Binding Soldier.TopWeapons}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="40" />
                                    <RowDefinition Height="50" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="100" />
                                    <ColumnDefinition Width="150" />
                                    <ColumnDefinition Width="150" />
                                </Grid.ColumnDefinitions>

                                <Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" 
                                       Source="{Binding Path=Image, Converter={StaticResource ImageUrlConverter}, ConverterParameter=Weapon}" 
                                       Width="90" Height="54" Margin="0,0,25,0" VerticalAlignment="Top" />
                                <TextBlock Grid.Row="0" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Path=Slug}" />
                                <TextBlock Grid.Row="0" Grid.Column="2" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Path=ServiceStars}" HorizontalAlignment="Right" />
                                <Image Grid.Row="0" Grid.Column="2" Source="{StaticResource ServiceStarUrl}" Width="30" Height="30" Margin="0,0,40,0" HorizontalAlignment="Right" VerticalAlignment="Center" />
                                <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource PhoneTextNormalStyle}" Text="{Binding Path=Kills}" HorizontalAlignment="Left" />
                                <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource PhoneTextNormalStyle}" Text="kills" HorizontalAlignment="Center" />
                                <TextBlock Grid.Row="1" Grid.Column="2" Style="{StaticResource PhoneTextNormalStyle}" Text="{Binding Headshots}" HorizontalAlignment="Left" />
                                <TextBlock Grid.Row="1" Grid.Column="2" Style="{StaticResource PhoneTextNormalStyle}" Text="headshots" HorizontalAlignment="Right" />
                            </Grid>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PanoramaItem>

            <!-- Top vehicles / Panorama item seven -->
            <controls:PanoramaItem Header="Top vehicles">
                <ListBox Margin="10" ItemsSource="{Binding Soldier.TopVehicles}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="40" />
                                    <RowDefinition Height="50" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="170" />
                                    <ColumnDefinition Width="150" />
                                    <ColumnDefinition Width="150" />
                                </Grid.ColumnDefinitions>

                                <Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" 
                                       Source="{Binding Path=Image, Converter={StaticResource ImageUrlConverter}, ConverterParameter=Vehicle}" 
                                       Width="147" Height="88" Margin="0,0,25,0" VerticalAlignment="Top" />
                                <TextBlock Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Path=Slug}" />
                                <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource PhoneTextNormalStyle}" Text="{Binding Path=Kills}" HorizontalAlignment="Left" />
                                <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource PhoneTextNormalStyle}" Text="kills" HorizontalAlignment="Center" />
                                <TextBlock Grid.Row="1" Grid.Column="2" Style="{StaticResource PhoneTextNormalStyle}" 
                                           Text="{Binding TimeIn, Converter={StaticResource TimeSpanStringConverter}}" 
                                           HorizontalAlignment="Left" Margin="0,0,5,0" />
                            </Grid>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PanoramaItem>

            <!-- Top gadgets / Panorama item eight -->
            <controls:PanoramaItem Header="Top gadgets">
                <ListBox Margin="10" ItemsSource="{Binding Soldier.TopGadgets}">
                    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="40" />
                                    <RowDefinition Height="50" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="168" />
                                    <ColumnDefinition Width="150" />
                                    <ColumnDefinition Width="152" />
                                </Grid.ColumnDefinitions>

                                <Image Grid.Row="0" Grid.Column="0" Grid.RowSpan="2" 
                                       Source="{Binding Path=Image, Converter={StaticResource ImageUrlConverter}, ConverterParameter=Gadget}" 
                                       Width="147" Height="88" Margin="0,0,25,0" VerticalAlignment="Top" />
                                <TextBlock Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Style="{StaticResource PhoneTextLargeStyle}" Text="{Binding Path=Slug}" />
                                <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource PhoneTextNormalStyle}" Text="{Binding Path=Kills}" HorizontalAlignment="Left" />
                                <TextBlock Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Style="{StaticResource PhoneTextNormalStyle}" Text="kills / performance" HorizontalAlignment="Center" />
                            </Grid>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                </ListBox>
            </controls:PanoramaItem>

            <!-- Statistics / Panorama item nine -->
            <controls:PanoramaItem Header="Statistics">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="240" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>

                    <TextBlock Grid.Row="0" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Kills" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="0" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" 
                               Text="{Binding Soldier.Statistics, Converter={StaticResource KillsAndAssistsStringConverter}, ConverterParameter=Kills}" 
                               HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="1" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Deaths" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="1" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}"
                               Text="{Binding Soldier.Statistics.Deaths, Converter={StaticResource IntegerStringConverter}}" 
                               HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="2" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Accuracy" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="2" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" 
                               Text="{Binding Soldier.Statistics.Accuracy, Converter={StaticResource DoublePercentageStringConverter}}" 
                               HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="3" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Longest HS" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="3" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" 
                               Text="{Binding Soldier.Statistics.LongestHeadshot, Converter={StaticResource DoubleStringConverter}, ConverterParameter=m}" 
                               HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="4" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Streak bonus" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="4" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" 
                               Text="{Binding Soldier.Statistics.KillStreakBonus, Converter={StaticResource IntegerStringConverter}}" 
                               HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="5" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Veh. destroyed" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="5" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" 
                               Text="{Binding Soldier.Statistics, Converter={StaticResource KillsAndAssistsStringConverter}, ConverterParameter=Vehicles}" 
                               HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="6" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Squad bonus" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="6" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" 
                               Text="{Binding Soldier.Statistics.SquadScoreBonus, Converter={StaticResource IntegerStringConverter}}" 
                               HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="7" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Repairs" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="7" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" 
                               Text="{Binding Soldier.Statistics.Repairs, Converter={StaticResource IntegerStringConverter}}" 
                               HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="8" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Revives" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="8" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" 
                               Text="{Binding Soldier.Statistics.Revives, Converter={StaticResource IntegerStringConverter}}" 
                               HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="9" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Heals" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="9" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" 
                               Text="{Binding Soldier.Statistics.Heals, Converter={StaticResource IntegerStringConverter}}" 
                               HorizontalAlignment="Right" VerticalAlignment="Center" />

                    <TextBlock Grid.Row="10" Grid.Column="0" Style="{StaticResource PhoneTextLargeStyle}" Text="Resupplies" VerticalAlignment="Center" />
                    <TextBlock Grid.Row="10" Grid.Column="1" Style="{StaticResource PhoneTextLargeStyle}" 
                               Text="{Binding Soldier.Statistics.Resupplies, Converter={StaticResource IntegerStringConverter}}" HorizontalAlignment="Right" VerticalAlignment="Center" />

                </Grid>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--
        <phone:PhoneApplicationPage.ApplicationBar>
            <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
                <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
                <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
                <shell:ApplicationBar.MenuItems>
                    <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                    <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
                </shell:ApplicationBar.MenuItems>
            </shell:ApplicationBar>
        </phone:PhoneApplicationPage.ApplicationBar>
        -->
</phone:PhoneApplicationPage>